<html xmlns="http://www.w3c.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Prime Faces</title>
        <style type="text/css">
            .ui-fileupload {
                width: 800px;
                margin: 0 auto;
            }
        </style>
    </h:head>
    <h:body>
        <h:outputText value="PrimeFaces Single Upload" 
                              style="font:30px bold; margin-left:15%;"/>
        <p:tabMenu activeIndex="0">
    <p:menuitem value="Overview" url="/ui/tabMenu.jsf" icon="ui-icon-star"/>
    <p:menuitem value="Demos" url="/ui/tabMenuDemos.jsf" icon="ui-icon-search" />
    <p:menuitem value="Documentation" url="/ui/tabMenuDocumentation.jsf" icon="ui-icon-document"/>
    <p:menuitem value="Support" url="/ui/tabMenuSupport.jsf" icon="ui-icon-wrench"/>
    <p:menuitem value="Social" url="/ui/tabMenuSocial.jsf" icon="ui-icon-person" />
</p:tabMenu>
        <br></br><br></br><br></br><br></br>                    
        <h:form enctype="multipart/form-data">
            <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}"
                mode="advanced"
                update="messages"
                label="Escolha um arquivo"
                sizeLimit="10485760"
                allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
                invalidSizeMessage="O tamanho máximo do arquivo é 10 Megabytes !"
                invalidFileMessage="Você pode enviar apenas arquivos .gif, .jpeg, .jpg e .png!"
                />
            <p:growl id="messages" showDetail="true" sticky="true"/>
        </h:form>

        
    </h:body>
</html>